import axios from 'axios'
export const ProgressDetailsService = class ProgressDetailsService {
    static progressDetailsService = null

    static getInstance() {
        if (this.progressDetailsService == null) {
            this.progressDetailsService = new ProgressDetailsService()
        }
        return this.progressDetailsService
    }


    save(progress){  //提交计划
        var params={}
        params.outputProgressPlan=progress
        return axios.post('http://localhost/output',params.outputProgressPlan)
    }

    saveBeach(OutputProgressPlanSubs){//提交子目清单

        var OutputProgressPlanSub={}
        OutputProgressPlanSubs.forEach(item=>{
            OutputProgressPlanSub=item
        })
        return axios.post(
            'http://localhost/output/outputsub',OutputProgressPlanSub)

    }

    list(params){//查询进度计划
        return axios.get(
            'http://localhost/output',{params})
    }
}